<div id="manage-series">
  <%= form_tag url_for(:action => 'update_positions') do %>
  <ul id="sortable_series_list">
    <% @serial_works.each_with_index do |serial, i| %>
      <li id="serial_<%= serial.id %>">
        <%= text_field_tag 'serial_works[]', nil, :size => 3, :maxlength => 3, :class => 'serial-position-field', :id => "serial_#{i}" %>
        <span id='position-for-<%= serial.id %>'><%= serial.position %></span>.
        <h3><%=h serial.work.title + (serial.work.posted? ? "" : " (DRAFT)") %></h3>
      </li>
    <% end %>
  </ul>
  <p class="submit"><%= submit_tag "Update Positions" %></p>
  <% end %>
</div>

<%= sortable_element('sortable_series_list', :url => {:action => :update_positions}) %>
